# Load Data ----------------------------------------------------------------
source("./main/study3_cleaning.R")

mt$pid3 <- NA
mt$pid3[which(mt$pid == 1 | mt$pidi == 1)] <- -1
mt$pid3[which(mt$pidi == 3)] <- 0
mt$pid3[which(mt$pid == 2 | mt$pidi == 2)] <- 1

mt$ideo3 <- NA
mt$ideo3[which(mt$ideo < 4)] <- -1
mt$ideo3[which(mt$ideo == 4)] <- 0
mt$ideo3[which(mt$ideo > 4)] <- 1


median(mt$age, na.rm = T)
prop.table(table(mt$race))
prop.table(table(mt$educ))
prop.table(table(mt$sex))
prop.table(table(mt$pid3))
prop.table(table(mt$ideo3))